package com.ruoyi.service.impl;


import com.ruoyi.domain.Company;
import com.ruoyi.mapper.CompanyMapper;
import com.ruoyi.service.ICompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CompanyServiceImpl implements ICompanyService {

/**
 *  Company /  company
 */

    @Autowired
    private CompanyMapper companyMapper;

    @Override
    public List<Company> list() {
        return companyMapper.selectList();
    }

    @Override
    public Company getById(Long id) {
        return companyMapper.selectByPrimaryKey(id);
    }

    @Override
    public int save(Company company) {
        return companyMapper.insertSelective(company);
    }

    @Override
    public int updateById(Company company) {
        return companyMapper.updateByPrimaryKeySelective(company);
    }

    @Override
    public int removeById(Long id) {
        return companyMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int removeByIds(Long[] ids) {
        return companyMapper.deleteByPrimaryKeys(ids);
    }
}
